







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Finds the minimum value in a collection.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static T Minimum<T>( IEnumerable<T> collection ) where T : IComparable<T> |
Visual Basic (Declaration) |
---|
Public Shared Function Minimum(Of T As IComparable(Of T)) ( _ collection As IEnumerable(Of T) _ ) As T |
Visual C++ |
---|
public: generic<typename T> where T : IComparable<T> static T Minimum ( IEnumerable<T>^ collection ) |
Parameters
- collection
- IEnumerable<(Of <T>)>
The collection to search.
Return Value
The smallest item in the collection.
Type Parameters
- T
- The type of items in the collection.
Remarks
Values in the collection are compared by using the IComparable<T>
interfaces implementation on the type T.
Exceptions
Exception | Condition |
---|---|
System..::InvalidOperationException | The collection is empty. |
System..::ArgumentNullException | collection is null. |
See Also
Algorithms Class
Wintellect.PowerCollections Namespace